package xin.baizhiedu.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import ws.schild.jave.EncoderException;

import java.net.MalformedURLException;

import static xin.baizhiedu.Util.VoiceUtil.acceptWaveForm;
@RestController
public class TranslateController {
    @GetMapping("/translate")
    public String MaterialInformationQuery(@RequestParam("wavFilePath")String wavFilePath, @RequestParam("cutDuration")Long cutDuration, @RequestParam("language")String language) throws EncoderException, MalformedURLException {
        return acceptWaveForm(wavFilePath, cutDuration,language);
    }
}
